<template>
	<div class="index" >
    <div class="flexcc" style="height: 100vh;">
      <div style="background: #fff; border-radius: 10px; padding: 50px 100px;">
        <div style="font-size:30px; font-style: italic; margin-bottom: 50px; text-align: center; font-weight: bold; background: linear-gradient(117.53deg, rgb(12, 131, 255),rgb(255, 0, 246));-webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent;">ADIC后台管理系统</div>

        <div style="margin-bottom: 20px;"><el-input v-model="all.name" placeholder="请输入用户名"></el-input></div>
        <div style="margin-bottom: 20px;"><el-input placeholder="请输入密码" v-model="all.password" show-password></el-input></div>
        <div style="margin-bottom: 20px;"><el-button type="primary" @click="zhuce">登录</el-button></div>
      </div>
    </div>
	</div>
</template>

<script>
	export default {
		name: 'index',
		data() {
			return {
        all:{
          name:"",
          password:""
        },
			}
		},
		created() {


		},
		mounted() {

		},
		methods: {
      zhuce:function(){
        axios.post(this.IP_URL+'/admin/auth/login',this.all).then((response)=>{
        	if (response.data.msg.code == 0) {
            localStorage.setItem('token',response.data.data)
            this.$router.push('/')
        	} else {
        		this.$message.error(response.data.msg.info);
        	}
        })
      },
    }
	}
</script>


<style scoped >
  .t_get_code{
  	width: 112px;
  	height: 32px;
  	background: #e6efff;
  	border: 1px solid #005aff;
  	border-radius: 25px;
  	text-align: center;
  	line-height: 32px;
  	color: #005AFF;
  	font-size: 14px;
  	cursor: pointer;
    position: absolute; right: 4px; top: 4px;
  }
</style>
